test: fix flaky thread-safety test, update README tech stack - #433
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThis PR makes the ChangesTest Determinism and Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@SysManager/SysManager.Tests/OperationLockServiceTests.cs`:
- Around line 96-97: The test creates CountdownEvent (ready) and
ManualResetEventSlim (go) which implement IDisposable and must be disposed to
avoid handle leaks; update the test in OperationLockServiceTests (the scope
where ready and go are created) to ensure both ready and go are disposed—either
wrap their creation in using blocks (or nested using statements) or dispose them
in a finally/tear-down block so ready.Dispose() and go.Dispose() are always
called after the test completes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5d8781a2-c3aa-4d27-8640-344773c4feb8
📒 Files selected for processing (3)
CHANGELOG.mdREADME.mdSysManager/SysManager.Tests/OperationLockServiceTests.cs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build & unit tests
- GitHub Check: Analyze (csharp)
🔇 Additional comments (3)
SysManager/SysManager.Tests/OperationLockServiceTests.cs (1)
99-114: LGTM!README.md (1)
455-455: LGTM!Also applies to: 458-458, 460-460
CHANGELOG.md (1)
9-17: LGTM!
| var ready = new CountdownEvent(10); | ||
| var go = new ManualResetEventSlim(false); |
There was a problem hiding this comment.
Dispose synchronization primitives to prevent handle leaks.
CountdownEvent and ManualResetEventSlim both implement IDisposable and should be disposed to release their underlying kernel handles.
🛠️ Proposed fix
- var ready = new CountdownEvent(10);
- var go = new ManualResetEventSlim(false);
+ using var ready = new CountdownEvent(10);
+ using var go = new ManualResetEventSlim(false);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| var ready = new CountdownEvent(10); | |
| var go = new ManualResetEventSlim(false); | |
| using var ready = new CountdownEvent(10); | |
| using var go = new ManualResetEventSlim(false); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@SysManager/SysManager.Tests/OperationLockServiceTests.cs` around lines 96 -
97, The test creates CountdownEvent (ready) and ManualResetEventSlim (go) which
implement IDisposable and must be disposed to avoid handle leaks; update the
test in OperationLockServiceTests (the scope where ready and go are created) to
ensure both ready and go are disposed—either wrap their creation in using blocks
(or nested using statements) or dispose them in a finally/tear-down block so
ready.Dispose() and go.Dispose() are always called after the test completes.
#433) ## Summary **Batch 9** — accessibility improvements across all XAML views. ### Issue #411 — Accessibility missing **Emoji replaced with text** across 21 XAML views: - \⟳\ refresh arrows → removed (text already says Refresh/Scan/Rescan) - \📁\ folder icons → Browse/Open text - \🔍\ search icons → removed (text already says Analyze/Scan) - \✕\ close/cancel → Cancel/X text - \📂\ open folder → Open text - \📋\ clipboard → Copy text - \🗑\ trash → removed (text already says Uninstall) - \⬆\ up arrow → Up text - \↺\ restore → removed (text already says Restore All) **AutomationProperties.Name added:** - All DataGrid elements → \Data table\ - ProgressBar elements → \Progress\ Screen readers now get meaningful text instead of emoji Unicode descriptions. ### Testing - Build: 0 errors - 21 files changed, 65 insertions, 65 deletions (net zero — replacements only) Closes #411 Co-authored-by: laurentiu021 <laurentiu021@users.noreply.github.com>
* test: fix flaky thread-safety test, update README tech stack * test: hold lock during concurrent acquisition attempts to prevent false positives --------- Co-authored-by: laurentiu021 <laurentiu021@users.noreply.github.com>
Summary
Test fix
Barrier+Thread.Sleep(50)with deterministicCountdownEvent+ManualResetEventSlim. Now asserts exactly 1 acquisition (was>= 1). Eliminates flaky failures on slow CI runners.Documentation
Summary by CodeRabbit
Documentation
Tests